import java.util.Scanner;

public class Solution {
    public boolean judge (String str){
        int len = str.length();
        int left = 0;
        int right = len-1;
        while(left < right){
            if(str.charAt(left) != str.charAt(right))
                return false;
            left++;
            right--;
        }
        return true;
    }

    public static void main(String[] args) {
        Scanner in = new Scanner(System.in);
        while(in.hasNextLine()){
            String word = in.nextLine();
            Solution solution = new Solution();
            System.out.println(solution.judge(word));
        }
    }
}
